package p2;

import java.util.Comparator;
import java.util.PriorityQueue;

class Imo implements Comparator<Integer> {
    @Override
    public int compare(Integer o1,Integer o2) {
        return o2-o1;
    }
}

public class Test {

    public static void main(String[] args) {
        PriorityQueue<Integer> list = new PriorityQueue<>(20,new Imo());

        list.offer(10);
        list.offer(20);

        System.out.println(list.peek());


    }
}
